package com.music.twitter.beans;

import twitter4j.http.AccessToken;

import com.music.service.twitter.beans.TwitterServiceBean;
import com.music.service.twitter.constants.TwitterState;

public class TwitterClientBean {
	
	private Long mMemberId;
	private String mTwitterId;
	private AccessToken mAccessToken;
	private TwitterState mState;
	
	public TwitterClientBean(TwitterServiceBean pTwitter){
		mMemberId = pTwitter.getMemberId();
		mAccessToken = new AccessToken(pTwitter.getToken(),pTwitter.getTokenSecret());
		mState = pTwitter.getState();
		mTwitterId = pTwitter.getTwitterId();
	}

	public TwitterClientBean() {
	}

	
	/**
	 * @return the twitterId
	 */
	public String getTwitterId() {
		return mTwitterId;
	}

	/**
	 * @param pTwitterId the twitterId to set
	 */
	public void setTwitterId(String pTwitterId) {
		mTwitterId = pTwitterId;
	}

	/**
	 * @return the memberId
	 */
	public Long getMemberId() {
		return mMemberId;
	}

	/*public Twitter getTwitter(){
		Twitter twitter = new Twitter()
	}*/
	
	
	/**
	 * @param pMemberId the memberId to set
	 */
	public void setMemberId(Long pMemberId) {
		mMemberId = pMemberId;
	}

	/**
	 * @return the accessToken
	 */
	public AccessToken getAccessToken() {
		return mAccessToken;
	}

	/**
	 * @param pAccessToken the accessToken to set
	 */
	public void setAccessToken(AccessToken pAccessToken) {
		mAccessToken = pAccessToken;
	}

	/**
	 * @return the state
	 */
	public TwitterState getState() {
		return mState;
	}

	/**
	 * @param pState the state to set
	 */
	public void setState(TwitterState pState) {
		mState = pState;
	}
	
	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("memberId="+mMemberId+"\t");
		sb.append("accessToken="+mAccessToken+"\t");
		sb.append("state="+mState);
		return sb.toString();
	}
}
